import React from 'react';
import {NavLink,useRoutes} from "react-router-dom";
import routes from './routes/index'
function App(props) {
const elements=useRoutes(routes)
    return (
        <div>
            <div className="row">
                <div className="col-xs-offset-2 col-xs-8">
                    <div className="page-header"><h2>React Router Demo</h2></div>
                </div>
            </div>
            <div className="row">
                <div className="col-xs-2 col-xs-offset-2">
                    <div className="list-group">
                        <NavLink to="/about" className="list-group-item " >About</NavLink>
                        <NavLink to="/home" className="list-group-item" >Home</NavLink>
                    </div>
                </div>
                {elements}
            </div>
        </div>
    );
}

export default App;